package com.demo.enums;

/**
 * 诊断类别：1 Padua(内科) 2 Caprini(外科)
 *
 */
public enum DeptTypeEnum {
    PADUA(1, "Padua(内科)"),
    CAPRINI(2, "Caprini(外科)");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    DeptTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static DeptTypeEnum getByValue(Integer value) {
        for (DeptTypeEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
